import { CardEvent } from "../../api/CardEvent";
import { Room } from "../../api/Room";
import { Card } from "../base/Card";

export class BambooCaning extends Card {
    title(room: Room, user: string): string {
        return '笞刑';
    }

    desc(room: Room, user: string): string {
        return '对指定部门造成-3势力，并让其抽1张牌。';
    }

    use(room: Room, user: string, target: string): void {
		var dept = room.getDept(target);
		if (!dept) return;

        dept.power -= 3;
        dept.power = Math.max(dept.power, 0);

        CardEvent.drawCard(room, target, target, 1, true);
    }
}